/***********************************************************************
    filename:   DaterOrganization.cpp
    created:    20/5/2012
    author:     4Ys

    purpose:    Implements class for Organization objects
*************************************************************************/

#include "DaterOrganization.h"

namespace Dater
{
	Organization::Organization(std::string name, int adminID)
	{
		_adminID = adminID;
		_name = name;
	}

	void Organization::deleteUser(int uid)
	{
		std::vector<int>::iterator iter;
		for ( iter = _userList.begin(); iter != _userList.end(); iter++ )
		{
			if ( *iter == uid )
			{
				_userList.erase( iter );
				return;
			}
		}
	}

	void Organization::deleteEvent(int eid)
	{
		std::vector<Event*>::iterator iter;
		for ( iter = _eventList.begin(); iter != _eventList.end(); iter ++ )
		{
			if ( (*iter)->getEventID() == eid )
			{
				_eventList.erase( iter );
				return;
			}
		}
	}


}